﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="OngPhanPhoi.aspx.cs" Inherits="PresentationLayer_Default" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Cập nhật ống phân phối</title>
    <style type="text/css">
        .style1
        {
            border-collapse: collapse;
        }
        .style4
        {
            height: 28px;
            width: 204px;
            text-align: left;
        }
        .style8
        {
            width: 173px;
        }
        .style9
        {
            height: 28px;
            width: 173px;
        }
        .style10
        {
            width: 198px;
        }
        .style11
        {
            text-align: center;
            margin-left: 80px;
        }
        .style12
        {
            text-align: center;
            color: #FF3300;
            font-size: x-large;
        }
        .style13
        {
            text-align: left;
            width: 204px;
        }
        </style>
<link type="text/css" href="../Style/jquery-ui-1.8.19.custom.css" rel="stylesheet" />
<script type="text/javascript" src="../JavaScript/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="../JavaScript/jquery-ui-1.8.19.custom.min.js"></script>
<script type="text/javascript">
    $(function () {
        $("#txtNgayCNC").datepicker({ dateFormat: 'dd/mm/yy', changeMonth: true,
            changeYear: true
        });
    });
</script>
    <script src="../JavaScript/CheckImpuValid.js" type="text/javascript"></script>
<style type="text/css">
.ui-datepicker { font-size:8pt !important}
    .style14
    {
        width: 72px;
    }
    .style15
    {
        height: 28px;
        width: 72px;
    }
    .style16
    {
        text-align: center;
        height: 21px;
    }
    .style18
    {
        height: 13px;
    }
    .style19
    {
        width: 31px;
    }
    .style20
    {
        height: 28px;
        width: 31px;
    }
    .style21
    {
        text-align: left;
        height: 24px;
        width: 204px;
    }
    .style22
    {
        width: 72px;
        height: 24px;
    }
    .style23
    {
        width: 31px;
        height: 24px;
    }
    .style24
    {
        width: 173px;
        height: 24px;
    }
    .style25
    {
        width: 198px;
        height: 24px;
    }
    .style26
    {
        text-align: center;
        margin-left: 80px;
        width: 204px;
    }
</style>
        <!-- loi doan javascript
        <script type="text/javascript">
            window.onload = function () {
                var date = new Date();
                var sDListNamSx = document.getElementById("DListNamSx");

                var sDListNamLD = document.getElementById("DListNamLD");
                for (var i = date.getFullYear(); i >= 1990; --i) {
                    var option = document.createElement('option');
                    var option1 = document.createElement('option');
                    option1.text = option1.value = option.text = option.value = i;
                    sDListNamSx.add(option, 0);
                    sDListNamLD.add(option1, 0);
                }
            };
        </script> -->
</head>
<body>
    <form id="frmOngPhanPhoi" runat="server">
   
    <%--    <script type="text/javascript">
        $(function () {
            $("#dialog1").dialog({
                width: 1100,
                height: 600,
                Close: function () {
                    $(this).dialog('close');
                },
                buttons:
                {
                    "Add": function () {
                        var _ObjectID = $("#<%= txtObjectID.ClientID  %>").val();
                        var _IDMaDoanOng = $("#<%= txtMaDoanOng.ClientID  %>").val();
                        var _IDDMA = $("#<%= txtDMA.ClientID %>").val();
                        var _IDMZ = $("#<%=  DListDMZ.ClientID %>").val();
                        var _HuongDongChay = $("#<%= DListHDChay.ClientID %>").val();
                        var _ChieuDai = $('#<%= nChieuDai.ClientID %>').val(); // $("#<%=  DListNamSx.ClientID %>").val();
                        //alert(_HuongDongChay);
                        $.ajax({
                            type: 'POST',
                            url: 'OngPhanPhoi.aspx/EdictOngPhanPhoi',
                            data: JSON.stringify({ objectID: +_ObjectID, IDMaDoanOng: "'" + _IDMaDoanOng + "'", IDMZ: "'" + _IDMZ + "'", IDDMA: "'" + _IDDMA + "'", HuongDongChay: +_HuongDongChay, ChieuDai: +_ChieuDai }),
                            contentType: "application/json; charset=utf-8",
                            dataType: "json",
                            success: function (msg) {
                                // alert(msg);
                                if (msg.d) {
                                    alert("Successfully added new item");
                                    window.history.go(-1);
                                }
                            },
                            error: function () {
                                alert("Error! Try again...");
                            }
                        });
                    },
                    "Cancel": function () {
                        $(this).dialog("close");
                    }
                }
            });

            $("#add").click(function (event) {
                event.preventDefault();
                $(".addNew").dialog("open");
            });
        });
</script>--%>
<!-- <div id="dialog1" style="display: none"> -->
    <div>
    <asp:HiddenField ID="txtObjectID" runat="server" />
            <table class="style1" border="0" align="center">
                <tr>
                    <td class="style12" colspan="5">
                        <strong>CẬP NHẬT THÔNG TIN THUỘC TÍNH ỒNG PHÂN PHỐI</strong></td>
                </tr>
                <tr>
                    <td colspan="5" class="style18">
                        </td>
                </tr>
                <tr>
                    <td class="style21">
                        Mã đoạn ống</td>
                    <td class="style22">
                        <asp:TextBox ID="txtMaDoanOng" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style23">
                        </td>
                    <td class="style24">
                        Năm sản xuất</td>
                    <td class="style25">
                        <asp:DropDownList ID="DListNamSx" runat="server" Height="28px" Width="134px" 
                            BackColor="White" CausesValidation="True">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Mã khu vực cấp nước (DMA)</td>
                    <td class="style14">
                        <asp:TextBox ID="txtDMA" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Năm lắp đặt</td>
                    <td class="style10">
                        <asp:DropDownList ID="DListNamLD" runat="server" Height="28px" Width="134px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style4">
                        Mã vùng cấp nước (DMZ)</td>
                    <td class="style15">
                        <asp:TextBox ID="txtDMZ" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style20">
                        &nbsp;</td>
                    <td class="style9">
                        Độ nhám danh định</td>
                    <td class="style10">
                        <asp:TextBox ID="txtDoNhamDD" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Hướng dòng chảy</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListHDChay" runat="server" Height="24px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Độ nhám thực tế</td>
                    <td class="style10">
                        <asp:TextBox ID="txtDoNhamTT" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Chiều dài (m)</td>
                    <td class="style14">
                        <asp:TextBox ID="nChieuDai" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Áp lực hoạt động (Bar)</td>
                    <td class="style10">
                        <asp:TextBox ID="dApLucHD" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Đường kính trong (mm)</td>
                    <td class="style14">
                        <asp:TextBox ID="nDKTrong" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Áp lực thiết kế (Bar)</td>
                    <td class="style10">
                        <asp:TextBox ID="dApLucTK" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Đường kính ngoài (mm)</td>
                    <td class="style14">
                        <asp:TextBox ID="nDKNgoai" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Điểm đầu</td>
                    <td class="style10">
                        <asp:TextBox ID="txtDiemDau" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Kích cở ống (mm)</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListKCOng" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Điểm cuối</td>
                    <td class="style10">
                        <asp:TextBox ID="txtDiemCuoi" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Vật liệu</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListVatLieu" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Độ sâu (m)</td>
                    <td class="style10">
                        <asp:TextBox ID="dDoSau" runat="server" Height="22px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Tiêu chuẩn vật liệu</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListTCVatLieu" runat="server" Height="28px" 
                            Width="217px" BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Độ dốc</td>
                    <td class="style10">
                        <asp:TextBox ID="dDoDoc" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Nhà sản xuất</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListNhaSX" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Tình trạng sử dụng</td>
                    <td class="style10">
                        <asp:DropDownList ID="DListTTSD" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Nước sản xuất</td>
                    <td class="style14">
                        <asp:DropDownList ID="DListNuocSX" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Đơn vị thiết kế</td>
                    <td class="style10">
                        <asp:DropDownList ID="DListDonViTK" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Số lần xảy ra sự cố khắc phục</td>
                    <td class="style14">
                        <asp:TextBox ID="lSLKPSuCo" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Đơn vị thi công</td>
                    <td class="style10">
                        <asp:DropDownList ID="DListDonViTC" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Người cập nhật cuối</td>
                    <td class="style14">
                        <asp:TextBox ID="txtNguoiCNC" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Đơn vị giám sát</td>
                    <td class="style10">
                        <asp:DropDownList ID="DListDonViGS" runat="server" Height="28px" Width="217px" 
                            BackColor="White">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Ngày cập nhật cuối</td>
                    <td class="style14">
        
                        <asp:TextBox ID="txtNgayCNC" runat="server" Height="21px" Width="210px" 
                            ReadOnly = "True" BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
            
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        Mã liên kết hình ảnh</td>
                    <td class="style10">
                        <asp:TextBox ID="txtMaHinhAnh" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
                    </td>
                </tr>
                <tr>
                    <td class="style13">
                        Loại Vật Liệu</td>
                    <td class="style14">
        
                        <asp:TextBox ID="txtLoaiVatLieu" runat="server" Height="21px" Width="210px" 
                            BorderStyle="Solid" BorderColor="#333300"></asp:TextBox>
            
                    </td>
                    <td class="style19">
                        &nbsp;</td>
                    <td class="style8">
                        &nbsp;</td>
                    <td class="style10">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td class="style26">
                        Ghi chú</td>
                    <td class="style44" colspan="3">
                        <asp:TextBox ID="txtGhiChu" runat="server" Height="156px" 
                            TextMode="MultiLine" Width="352px" BorderStyle="Solid" 
                            BorderColor="#333300"></asp:TextBox>
                    </td>
                    <td class="style10">
                        <img src="../images/noImage.gif" style="height: 146px; width: 219px"/></td></td>
                </tr>
                <tr>
                    <td class="style11" colspan="5">
                        <asp:Button ID="btnCapNhat" runat="server" onclick="btnCapNhat_Click" 
                            Text="Cập nhật" style="text-align: center" />   
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;   
                        <asp:Button ID="btnHuyBo" runat="server" style="text-align: center" 
                            Text="Hủy bỏ" onclick="btnHuyBo_Click" />
                    </td>
                </tr>
            </table>

    </div>
    </form>
</body>
</html>
